/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package personas;



/**
 *
 * @author Matiu
 */
public class Ciudad {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
         

         char[][] ciudad = {{'p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p'},           
        {'p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p'},
	{'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
	{'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p'},           
        {'p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p'},
        {'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
	{'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p'},           
        {'p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p'},
        {'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
	{'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p'},           
        {'p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p'},
        {'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
	{'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p'},           
        {'p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p','z','-','-','-','-','z','p','p'},
        {'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
        {'-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-','v','-','-','-','-','v','-','-'},
	{'-','-','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','z','z','v','v','v','v','v','v','-','-'},
        {'p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p'},           
        {'p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p','-','-','-','-','-','-','p','p'}};
     
        
        lanzar_persona("matias",'@',ciudad,1000);
    
    }

  
    
    public static void lanzar_persona(String nombre, char inicial,char[][] ciudad, int dormir){
         int origenX;
         int origenY;
         int destinoX;
         int destinoY;
         
        OrigenDestino o = new OrigenDestino(ciudad);
        int valor[] = new int[2];
        valor = o.numero();
        
        origenX=valor[0];
        origenY=valor[1];
        
        valor = o.numero();
        destinoX=valor[0];
        destinoY=valor[1];
        
        persona p = new persona(ciudad, nombre,inicial,origenX,origenY,destinoX,destinoY);
        p.start();
      
       
    }
}
